#ifndef LINECHART_H
#define LINECHART_H

#include <QtGui/QWidget>
#include <qpainter.h>
#include <qevent.h>
#include <qfontmetrics.h>
#include "Plotter.h"

class LineChart : public QWidget
{
    Q_OBJECT

public:
    LineChart(QWidget *parent = 0);
    ~LineChart();

    void setDataset(CategoryDataSet* dataset);

    void setTitle(QString);

    void setHorizontalTitle(QString);

    void setVerticalTitle(QString);

protected:
    void paintEvent(QPaintEvent *event);

private:
    QBrush mBackground;
    Plotter* mPlotter;
    CategoryDataSet* mDataset;
    QString mChartTitle;
    QFont mTitleFont;
    QFont mAxisFont;
    QFontMetrics* mTitleFontMetrics;
    QFontMetrics* mAxisFontMetrics;
    QString mHorizontalTilte;
    QString mVerticalTitle;
};

#endif // LINECHART_H
